package com.alliky.sign.mvp.presenter;

import com.alliky.core.base.BasePresenter;
import com.alliky.sign.mvp.contract.LoginContract;
import com.alliky.sign.mvp.model.LoginModel;

public class LoginPresenter extends BasePresenter<LoginModel, LoginContract.View> implements LoginContract.Presenter {

    public LoginPresenter(LoginContract.View view) {
        super(view);
    }

    @Override
    protected LoginModel createModel() {
        return new LoginModel();
    }

    @Override
    public void login(String username, String password) {
        if (!isViewAttached()) return;
//        mModel.login(getContext(), username, password, new HttpCallback<UserEntity>() {
//            @Override
//            public void onSuccess(UserEntity result) {
//                mView.loginResult(result);
//            }
//
//            @Override
//            public void onError(int code, String messsage) {
//                mView.showMessage(code, messsage);
//            }
//        });
    }

}
